home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-11-19 | 1.3 KB | 67 lines | [TEXT/MPS ] |
- /*
- File: ASLMCLibs.h
-
- Contains: Stdio equates for ASLM Libraries
-
- Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
-
- */
-
- //
- // WARNING: This file should only be included by a library that is using
- // MPWCallbacks.cl.o or MPWLibs.cl.o
- // This must be included before other include files to make sure
- // that the reassignments take place
- //
- #ifndef __ASLMCLIBS__
- #define __ASLMCLIBS__
-
- #ifndef __LIBRARYMANAGER__
- #include <LibraryManager.h>
- #endif
- #ifndef __STDIO__
- #include <stdio.h>
- #endif
- //
- // Get rid of the declaration of errno so it doesn't conflict with
- // our #define below
- //
- #define errno localErrno
- #ifndef __ERRNO__
- #include <errno.h>
- #endif
- //
- // Get rid of the declaration of MacOSErr so it doesn't conflict with
- // our #define below
- //
- #define MacOSErr localMacOSErr
- #ifndef __ERRORS__
- #include <Errors.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern int* GetClientErrno(void);
- extern short* GetClientMacOSErr(void);
- extern FILE* GetStdIOFile(int);
-
- #ifdef __cplusplus
- };
- #endif
-
- #undef stdin
- #undef stdout
- #undef stderr
- #define stdin GetStdIOFile(0)
- #define stdout GetStdIOFile(1)
- #define stderr GetStdIOFile(2)
-
- #undef errno
- #undef MacOSErr
- #define errno (*GetClientErrno())
- #define MacOSErr (*GetClientMacOSErr())
-
- #endif
-